<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page isELIgnored="false" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>试卷解析</title>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <link href="../css/iconfont1.css" rel="stylesheet" type="text/css" />
    <link href="../css/test.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main">
    <!--nr start-->
    <div class="test_main">
        <div class="nr_left">
            <div class="test">
                <form action="#" method="post">
                    <div class="test_content">
                        <div class="test_content_title">
                            <h2>单选题</h2>
                            <p>
                                <span>共</span><i class="content_lit">${xlist.size()}</i><span>题，</span><span>合计</span><i
                                    class="content_fs">${dsum}</i><span>分</span>
                            </p>
                        </div>
                    </div>
                    <div class="test_content_nr">
                        <ul>
                            <%
                            int cf=1;
                            %>
                            <c:forEach items="${xlist}" var="test">

                                <li id="te<%=cf%>">
                                    <span style="display: none;">${test.question_id}</span>
                                    <u style="display: none;">${test.question_score}</u>
                                    <div class="test_content_nr_tt">
                                        <i><%=cf%></i><span>(${test.question_score}分)</span>
                                        <font>${test.question_name}</font><b
                                            class="icon iconfont">&#xe881;</b>
                                    </div>
                                    <div class="test_content_nr_main">
                                        <ul>
                                            <c:choose>
                                                <c:when test="${test.user_answer=='A'}">
                                                    <li class="option">

                                                        <input type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                               id="0_answer_<%=cf%>_option_1" value="A" checked="checked"/>


                                                        <label for="0_answer_<%=cf%>_option_1">
                                                            A.
                                                            <p class="ue" style="display: inline;">${test.question_answera}</p>
                                                        </label>
                                                    </li>

                                                    <li class="option">

                                                        <input  type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                                id="0_answer_<%=cf%>_option_2"  value="B"/>


                                                        <label for="0_answer_<%=cf%>_option_2">
                                                            B.
                                                            <p class="ue" style="display: inline;">${test.question_answerb}</p>
                                                        </label>
                                                    </li>

                                                    <li class="option">

                                                        <input  type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                                id="0_answer_<%=cf%>_option_3" value="C" />


                                                        <label for="0_answer_<%=cf%>_option_3">
                                                            C.
                                                            <p class="ue" style="display: inline;">${test.question_answerc}</p>
                                                        </label>
                                                    </li>

                                                    <li class="option">

                                                        <input  type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                                id="0_answer_<%=cf%>_option_4" value="D" />


                                                        <label for="0_answer_<%=cf++%>_option_4">
                                                            D.
                                                            <p class="ue" style="display: inline;">${test.question_answerd}</p>
                                                        </label>
                                                        <p style="color: red;">你的答案:${test.user_answer}</p><p style="color: #0F9E5E">正确答案:${test.question_answer}</p>
                                                    </li>
                                                </c:when>
                                                <c:when test="${test.user_answer=='B'}">
                                                    <li class="option">

                                                        <input type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                               id="0_answer_<%=cf%>_option_1" value="A" />


                                                        <label for="0_answer_<%=cf%>_option_1">
                                                            A.
                                                            <p class="ue" style="display: inline;">${test.question_answera}</p>
                                                        </label>
                                                    </li>

                                                    <li class="option">

                                                        <input  type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                                id="0_answer_<%=cf%>_option_2"  value="B" checked="checked"/>


                                                        <label for="0_answer_<%=cf%>_option_2">
                                                            B.
                                                            <p class="ue" style="display: inline;">${test.question_answerb}</p>
                                                        </label>
                                                    </li>

                                                    <li class="option">

                                                        <input  type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                                id="0_answer_<%=cf%>_option_3" value="C" />


                                                        <label for="0_answer_<%=cf%>_option_3">
                                                            C.
                                                            <p class="ue" style="display: inline;">${test.question_answerc}</p>
                                                        </label>
                                                    </li>

                                                    <li class="option">

                                                        <input  type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                                id="0_answer_<%=cf%>_option_4" value="D" />


                                                        <label for="0_answer_<%=cf++%>_option_4">
                                                            D.
                                                            <p class="ue" style="display: inline;">${test.question_answerd}</p>
                                                        </label>
                                                            <p style="color: red;">你的答案:${test.user_answer}</p><p style="color: #0F9E5E">正确答案:${test.question_answer}</p>
                                                    </li>
                                                </c:when>
                                                <c:when test="${test.user_answer=='C'}">
                                                    <li class="option">

                                                        <input type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                               id="0_answer_<%=cf%>_option_1" value="A"/>


                                                        <label for="0_answer_<%=cf%>_option_1">
                                                            A.
                                                            <p class="ue" style="display: inline;">${test.question_answera}</p>
                                                        </label>
                                                    </li>

                                                    <li class="option">

                                                        <input  type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                                id="0_answer_<%=cf%>_option_2"  value="B"/>


                                                        <label for="0_answer_<%=cf%>_option_2">
                                                            B.
                                                            <p class="ue" style="display: inline;">${test.question_answerb}</p>
                                                        </label>
                                                    </li>

                                                    <li class="option">

                                                        <input  type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                                id="0_answer_<%=cf%>_option_3" value="C" checked="checked" />


                                                        <label for="0_answer_<%=cf%>_option_3">
                                                            C.
                                                            <p class="ue" style="display: inline;">${test.question_answerc}</p>
                                                        </label>
                                                    </li>

                                                    <li class="option">

                                                        <input  type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                                id="0_answer_<%=cf%>_option_4" value="D" />


                                                        <label for="0_answer_<%=cf++%>_option_4">
                                                            D.
                                                            <p class="ue" style="display: inline;">${test.question_answerd}</p>
                                                        </label>
                                                        <p style="color: red;">你的答案:${test.user_answer}</p><p style="color: #0F9E5E">正确答案:${test.question_answer}</p>

                                                    </li>
                                                </c:when>

                                                <c:otherwise>
                                                    <li class="option">

                                                        <input type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                               id="0_answer_<%=cf%>_option_1" value="A"/>


                                                        <label for="0_answer_<%=cf%>_option_1">
                                                            A.
                                                            <p class="ue" style="display: inline;">${test.question_answera}</p>
                                                        </label>
                                                    </li>

                                                    <li class="option">

                                                        <input  type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                                id="0_answer_<%=cf%>_option_2"  value="B"/>


                                                        <label for="0_answer_<%=cf%>_option_2">
                                                            B.
                                                            <p class="ue" style="display: inline;">${test.question_answerb}</p>
                                                        </label>
                                                    </li>

                                                    <li class="option">

                                                        <input  type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                                id="0_answer_<%=cf%>_option_3" value="C" />


                                                        <label for="0_answer_<%=cf%>_option_3">
                                                            C.
                                                            <p class="ue" style="display: inline;">${test.question_answerc}</p>
                                                        </label>
                                                    </li>

                                                    <li class="option">

                                                        <input  type="radio" class="radioOrCheck" name="ans<%=cf%>"
                                                                id="0_answer_<%=cf%>_option_4" value="D" checked="checked" />


                                                        <label for="0_answer_<%=cf++%>_option_4">
                                                            D.
                                                            <p class="ue" style="display: inline;">${test.question_answerd}</p>
                                                        </label>
                                                        <p style="color: red;">你的答案:${test.user_answer}</p><p style="color: #0F9E5E">正确答案:${test.question_answer}</p>

                                                    </li>
                                                </c:otherwise>
                                            </c:choose>
                                        </ul>
                                    </div>
                                </li>
                            </c:forEach>
                        </ul>
                    </div>

                    <div class="test_content">
                        <div class="test_content_title">
                            <h2>多选题</h2>
                            <p>
                                <span>共</span><i class="content_lit">${dlist.size()}</i><span>题，</span><span>合计</span><i
                                    class="content_fs">${dxnum}</i><span>分</span>
                            </p>
                        </div>
                    </div>
                    <div class="test_content_nr">
                        <ul>
                            <%
                            int  dx=1;
                            %>
                            <c:forEach items="${dlist}" var="dlis" >
                                <li id="dx<%=dx%>">
                                    <span style="display: none">${dlis.question_id}</span>
                                    <u style="display: none">${dlis.question_score}</u>
                                    <div class="test_content_nr_tt">
                                        <i><%=dx%></i><span>(${dlis.question_score}分)</span>
                                        <font>${dlis.question_name}</font><b class="icon iconfont">&#xe881;</b>
                                    </div>

                                    <div class="test_content_nr_main">
                                        <ul>
                                            <li class="option2">


                                                <input type="checkbox" class="radioOrCheck" name="answer<%=dx%>"
                                                       id="1_answer_<%=dx%>_option_1" value="A"/>

                                                <label for="1_answer_<%=dx%>_option_1">
                                                    A.
                                                    <p class="ue" style="display: inline;">${dlis.question_answera}</p>
                                                </label>
                                            </li>

                                            <li class="option2">


                                                <input type="checkbox" class="radioOrCheck" name="answer<%=dx%>"
                                                       id="1_answer_<%=dx%>_option_2" value="B"/>

                                                <label for="1_answer_<%=dx%>_option_2">
                                                    B.
                                                    <p class="ue" style="display: inline;">${dlis.question_answerb}</p>
                                                </label>
                                            </li>

                                            <li class="option2">


                                                <input type="checkbox" class="radioOrCheck" name="answer<%=dx%>"
                                                       id="1_answer_<%=dx%>_option_3" value="C"/>

                                                <label for="1_answer_<%=dx%>_option_3">
                                                    C.
                                                    <p class="ue" style="display: inline;">${dlis.question_answerc}</p>
                                                </label>
                                            </li>

                                            <li class="option2">

                                                <input type="checkbox" class="radioOrCheck" name="answer<%=dx%>"
                                                       id="1_answer_<%=dx%>_option_4" value="D"/>

                                                <label for="1_answer_<%=dx++%>_option_4">
                                                    D.
                                                    <p class="ue" style="display: inline;">${dlis.question_answerd}</p>
                                                </label>
                                                <p style="color:red;">你的答案:${dlis.user_answer}</p><p style="color: #0F9E5E">正确答案:${dlis.question_answer}</p>
                                            </li>

                                        </ul>
                                    </div>
                                </li>
                            </c:forEach>
                        </ul>
                        <div style="height: 60px;width:100%"></div>
                    </div>
                </form>
            </div>

        </div>
        <div class="nr_right">
            <div class="nr_rt_main">
                <div class="rt_nr1">
                    <div class="rt_nr1_title">
                        <h1>
                            <i class="icon iconfont"></i>考试详情
                        </h1>
                    </div>
                    <div class="rt_content">
                        <div class="rt_content_tt">
                            <h2>单选题</h2>
                            <p>
                                <span>共</span><i class="content_lit">${xlist.size()}</i><span>题</span>
                            </p>
                        </div>
                        <div class="rt_content_nr answerSheet">
                            <ul>
                                <c:forEach begin="${1}" end="${xlist.size()}" var="k">
                                    <li><a href="#te${k}">${k}</a></li>
                                </c:forEach>
                            </ul>
                        </div>
                    </div>

                    <div class="rt_content">
                        <div class="rt_content_tt">
                            <h2>多选题</h2>
                            <p>
                                <span>共</span><i class="content_lit">${dlist.size()}</i><span>题</span>
                            </p>
                        </div>
                        <div class="rt_content_nr answerSheet">
                            <ul>
                                <c:forEach begin="${1}" end="${dlist.size()}" var="f">
                                    <li><a href="#dx${f}">${f}</a></li>
                                </c:forEach>
                            </ul>
                        </div>
                    </div>

                </div>

            </div>
        </div>
    </div>
    <!--nr end-->
    <div class="foot"></div>
</div>
<script>
    window.onload=function () {
        document.get
        alert(<%=dx%>);
    }
</script>
</body>
</html>